import React from 'react'
import Login from '../views/account/Login'
import UserInfo from "../views/user/UserInfo";
import Authority from "../views/user/Authority";
import Error from '../views/error/Error'
import UserInfoEdit from '../views/user/UserInfoEdit';
import UserInfoAdd from '../views/user/UserInfoAdd';
/*const BasicRoute = () => (
     <Router>
        <div>
            <Switch>
             {/!*   <Route exact path="/">
                    <Login />
                </Route>*!/}
                <Route exact path="/" component={Login} />
                <Route path="/Home" component={Home} />
                {/!*<Route path="/userInfo" component={UserInfo} />*!/}
                <Route path="/news" component={News}/>
                {/!*<Route path="/news/:id" component={NewsDetail}/>*!/}
                <Route path="/course" component={Course}/>
                <Route path="/joinUs" render={(props) => <JoinUs {...props}/>}/>
                <Route path="/error" render={(props) => <div><h1>404 Not Found!</h1></div>}/>
               {/!* <Route path="*" render={(props) => <Redirect to='/error'/>}/>*!/}
            </Switch>
        </div>
    </Router>
);*/


export const mainRoutes = [
    {
        path: '/',
        component: Login,
        exact: true,
    },

   {
        path: '/error',
        component: Error,
    },
]

export const adminRoutes = [
    {
        path: '/admin/userInfo',
        component: UserInfo,
        title:"用户信息",
        icon:"UserOutlined",
        isShow:true
    },   {
        path: '/admin/authority',
        component:Authority ,
        title:"权限管理",
        isShow:true
    },

   // 用户开始
    {
        path: '/admin/userInfoEdit/',//编辑用户
        component: UserInfoEdit,
        title:"编辑用户",
        icon:"UserOutlined",
        isShow:false
    }, {
        path: '/admin/userInfoAdd/',//添加用户
        component: UserInfoAdd,
        isShow:false
    },

   // 用户结束
   /* {
        path: '/admin/advantage',
        component: advantage,
        children: [
            {
                path: '/advantage/advantage1',
                component: A
            }
        ]
    }*/
]


